//
//  HXCollecotionFlowLayout.h
//  ZCooking
//
//  Created by 韩旭 on 16/9/1.
//  Copyright © 2016年 HX_. All rights reserved.
//

#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@protocol waterFlowLayoutDelegate <NSObject>
- (CGFloat)collectionView:(UICollectionView *)collectionView
                   layout:(UICollectionViewLayout *)collectionViewLayout
                    width:(CGFloat)width
 heightForItemAtIndexPath:(NSIndexPath *)indexPath;
@end
//自定义布局继承与UICollectionViewFlowLayout
//切记不继承于UICollectionFlowLayout
@interface HXCollecotionFlowLayout : UICollectionViewLayout
// CollectonView 有多少列
@property (nonatomic, assign) NSInteger numberOfColumns;
@property (nonatomic, weak) id<waterFlowLayoutDelegate>delegate;
@property (nonatomic, assign) NSInteger cellMargin;
@end
NS_ASSUME_NONNULL_END